<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- Set render engine for 360 browser -->
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- HTML5 shim for IE8 support of HTML5 elements -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
			</script>
		<![endif]-->
		<link href="__THEMES__/css/theme.min.css" rel="stylesheet">
		<link href="__THEMES__/css/simplebootadmin.css" rel="stylesheet">
		<link href="__THEMES__/css/default.css" rel="stylesheet" />
		<link href="__THEMES__/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<style>
			.length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
			.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
			0px;}
		</style>
		<!--[if IE 7]>
			<link rel="stylesheet" href="__THEMES__/css/font-awesome-ie7.min.css">
		<![endif]-->
		<script type="text/javascript">
			//全局变量
			var GV = {
				WEB_ROOT:"",
				DIMAUB: "/",
				JS_ROOT: "/theme/backend/assets/js/",
				TOKEN: ""
			};
		</script>
		<!-- Le javascript==================================================-
		-> <!-- Placed at the end of the document so the pages load faster -->
		<script src="__THEMES__/js/jquery.js"></script>
		<script src="__THEMES__/js/wind.js"></script>
		<script src="__THEMES__/js/bootstrap.min.js"></script>
		<link href="__THEMES__/kindeditor/themes/default/default.css" rel="stylesheet"/>
		<script src="__THEMES__/kindeditor/kindeditor-min.js"></script>
		<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					allowFileManager : true,
					uploadJson:"{:url("Slide/upload")}"
				});
				var uploadbutton = K.uploadbutton({
					button : K('#uploadButton')[0],
					fieldName : 'imgFile',
					url : '{:url("Slide/upload")}',
					afterUpload : function(data) {
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
									K('#url').val(url);
									$('#show_thumb').attr('src',url).show();
								} else {
									alert(data.message);
								}
							},
							afterError : function(str) {
								alert('自定义错误信息: ' + str);
							}
					});
					uploadbutton.fileBox.change(function(e) {
					uploadbutton.submit();
				});
			});
		</script>
	</head>
	<body>
		<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Posts/index')}">文章管理</a></li>
			<li class="active"><a href="{:url('Posts/add')}">添加文章</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="">
			<fieldset>
			<div class=""> 
			<table class="table table-bordered"> 
			<tbody>
			<tr> 
				<th width="80">标题</th> 
				<td> 
					<input type="text" style="width: 400px;" name="title" id="title" value="" placeholder="请输入标题"> <span class="form-required">*</span> 
				</td> 
			</tr>
			<tr>
				<th>所属分类</th> 
				<td>
					<select name="cateid">
						<option value="0">选择分类</option>
						{$categorys}
					</select>
				</td> 
			</tr>
			<tr> 
				<th width="80">缩略图</th> 
				<td> 
					<input class="ke-input-text" type="text" id="url" value="" name='thumb' readonly="readonly" /> 
					<input type="button" id="uploadButton" value="上传缩略图" />
					<img src="" style="width:50px;height:50px; display:none;" id="show_thumb"/>
					<span class="form-required">*</span>
				</td> 
			</tr>  
			<tr> 
				<th>添加时间</th> 
				<td><input type="text" name="updatetime" value="2017-06-11 10:38:49" class="js-datetime date"></td> 
			</tr> 
			<tr>
				<th>文章来源</th> 
				<td><input type="text" name="source" value="" style="width: 280px" placeholder="文章来源"></td> 
			</tr> 
			<tr>
				<th>作者</th> 
				<td><input type="text" name="author" value="" style="width: 280px" placeholder=""></td> 
			</tr> 
			<tr>
				<th>文章类型</th> 
				<td>
					<select name="type">
						<option value="1">文章列表</option>
						<option value="2">图片列表</option>
					</select>
				</td> 
			</tr>
			<tr>
				<th>是否审核</th> 
				<td><label><input type="radio" name="ischeck" value="1" checked /> 已审核</label><label><input type="radio" name="ischeck" value="0"/> 未审核</label></td> 
			</tr>
			<tr>
				<th>是否可评论</th> 
				<td><label><input type="radio" name="iscomment" value="1" checked /> 可评论</label><label><input type="radio" name="iscomment" value="0"/> 不可评论</label></td> 
			</tr> 
			<tr>
				<th>是否置顶</th> 
				<td><label><input type="radio" name="istop" value="1" /> 置顶</label><label><input type="radio" name="istop" checked value="0"/> 不置顶</label></td> 
			</tr>
			<tr>
				<th>是否推荐</th> 
				<td><label><input type="radio" name="isrecommend" value="1" /> 推荐</label><label><input type="radio" name="isrecommend" value="0" checked/> 不推荐</label></td> 
			</tr>  
			<tr> 
				<th>内容</th> 
				<td><textarea name="content" id="content" style="width: 98%; height: 260px;"></textarea></td> 
			</tr>  
			</tbody>
			</table> 
			</div>
			</fieldset>
			<div class="form-actions">
				<button class="btn btn-primary js-ajax-submit" type="submit">添加</button>
				<a class="btn" href="javascript:history.back(-1);">返回</a>
			</div>
		</form>
	</div>
	<script src="__THEMES__/js/common.js"></script>
	</body>

</html>